<div nz-row nzGutter="16">
    <div nz-col class="gutter-row" nzSpan="12">
        <div style="margin-bottom: 16px;">
            <nz-input-group nzAddOnBefore="文章标题">
                <input type="text" nz-input [(ngModel)]="title" placeholder="请输入文章标题">
            </nz-input-group>
        </div>
    </div>
    <div nz-col class="gutter-row" nzSpan="12">
        <div style="margin-bottom: 16px;">
            <nz-input-group nzAddOnBefore="文章作者">
                <input type="text" nz-input [(ngModel)]="author" placeholder="请输入文章作者">
            </nz-input-group>
        </div>
    </div>
    <div nz-col class="gutter-row" nzSpan="12">
        <div nz-row>
            <div nz-col nzSpan="10">
                <nz-select style="width: 150px;" [(ngModel)]="category" nzAllowClear nzPlaceHolder="请选择文章分类">
                    <nz-option *ngFor="let item of categorys" [nzValue]="item.cName" [nzLabel]="item.cName"></nz-option>
                </nz-select>
            </div>
            <div nz-col nzSpan="14">
                <nz-tag [nzColor]="'blue'" *ngFor="let tag of tags; let i = index;" [nzMode]="i === 0 ? 'default' : 'closeable'" (nzAfterClose)="handleClose(tag)">
                    {{ sliceTagName(tag) }}
                </nz-tag>
                <nz-tag *ngIf="!inputVisible" class="editable-tag" (click)="showInput()">
                    <i nz-icon type="plus"></i> 文章标签
                </nz-tag>
                <input #inputElement nz-input nzSize="small" *ngIf="inputVisible" type="text" [(ngModel)]="inputValue" style="width: 78px;" (blur)="handleInputConfirm()" (keydown.enter)="handleInputConfirm()">
            </div>
        </div>
    </div>
    <div nz-col class="gutter-row" nzSpan="12">
        <div style="margin-bottom: 16px;">
            <nz-input-group nzAddOnBefore="文章来源">
                <input type="text" nz-input [(ngModel)]="origin" placeholder="请输入文章来源，默认来自本系统">
            </nz-input-group>
        </div>
    </div>
</div>

<div id="md" appEditorMd [editormdConfig]="conf" (onHtmlEmit)="onHtmlEmits($event)" (onEditorChange)="syncModel($event)">
    <textarea style="display: block;" [(ngModel)]="markdown"></textarea>
</div>
<div class="footer">
    <button nz-button nzType="danger" style="margin-right:20px" (click)="publishBtn(0)">存入草稿</button>
    <button nz-button nzType="primary" (click)="publishBtn(1)">发布文章</button>
</div>